<template>
	<view>
		<view class="" v-if="headNavigationType==1">
			<view class="fan1" @click="fan()" :style="{'margin-top': mt}">
				<image src="../../static/fanhui.png" mode=""></image>
			</view>
			
		</view>
		<view class="topt1" v-if="headNavigationType==2" :style="{'height': NavigationHeight,'padding-top':NavigationPadding }">
			<view class="fan" @click="fan()">
				<image src="../../static/fanhui.png" mode=""></image>
			</view>
			<view class="con">
				砍价免费拿
			</view>
			<view class="gz" @click="goRule()" v-if="!headNavigationRight">
				规则
			</view>
		</view>
	</view>
	
</template>

<script>
		export default {
			props: {
				headNavigation:{
					type: String
				},
				headNavigationType:{
					type: String
				},
				headNavigationTitle:{
					type: String
				},
				headNavigationRight:{
					type: Boolean
				},
			},
			data () {
				return {
					mt:0,
					NavigationHeight:'100upx',
					NavigationPadding:'0upx',
				}
			},
			created(){
				// #ifdef APP-PLUS
				
				switch (uni.getSystemInfoSync().platform) {
					case 'android':
						this.mt = '50upx';
						this.NavigationHeight = '150upx';
						this.NavigationPadding = '50upx';
						break;
					case 'ios':
						this.mt = '70upx';
						break;
				}
				// #endif
			},
			methods:{
				fan() {
					this.$emit("fan","")
				},
				goRule(){
					uni.navigateTo({
						url:"../../pages/bargain/rule"
					})
				}
			}
		}
</script>

<style lang="scss" scoped>
	.fan1 {
		position: absolute;
		z-index: 10;
		width: 24upx;
		height: 42upx;
		top: 30upx;
		left: 30upx;
		image {
			width: 100%;
			height: 100%;
		}
	}
	//导航栏
	.topt1 {
		width: 100%;
		height: 100upx;
		background:linear-gradient(360deg,rgba(255,0,0,1) 0%,rgba(255,60,60,1) 100%);
		 position: relative;
		.fan {
			width: 24upx;
			height: 40upx;
			float: left;
			margin-left: 28upx;
			top: 40upx;
			margin-top: 30upx;
			image {
				width: 100%;
				height: 100%;
			}
		
		}
		.con {
			width:234upx;
			height:46upx;
			font-size:36upx;
			font-family:Alibaba PuHuiTi;
			font-weight:400;
			color: #FFFFFF;
			// float: left;
			line-height: 46upx;
			// text-align: center;
			padding-top: 30upx;
			margin-left:38% ;
			letter-spacing:1px;
		}
		.gz {
			position: absolute;
			color: #FFFFFF;
			font-size:30upx;
			padding-right: 40upx;
			margin-bottom: 20upx;
			right: 0;
			bottom: 0upx;
		}
	}
</style>
